package com.pan.admin.module.api.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pan.admin.common.annotation.Excel;
import com.pan.admin.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;


/**
 * API流水明细记录表 api_key_bill
 *
 * @author zjq
 * @date 2024-8-16
 */
@Data
public class ApiKeyBill extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 机构主键id
     */
    private Long loanProductId;

    /**
     * 机构计划id
     */
    private Long loanProductPlanId;

    /**
     * 用户id
     */
    private Long loanUserId;

    /**
     * 客户端id
     */
    private String apiClientId;

    /**
     * 手机号md5
     */
    private String phoneMd5;

    /**
     * 操作金额amount
     */
    @Excel(name = "操作金额")
    private BigDecimal amount;

    /**
     * 当前余额
     */
    @Excel(name = "当前余额")
    private BigDecimal currentBalance;

    /**
     * 操作过后账户余额
     */
    @Excel(name = "操作过后账户余额")
    private BigDecimal accountBalance;

    /**
     * 操作类型(0扣款， 1充值)
     */
    @Excel(name = "操作类型", readConverterExp = "0=扣款,1=充值,2机构计划,3平台计划,4唤醒计划,5补单")
    private Long type;

    /**
     * 创建者
     */
    @Excel(name = "创建者")
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新者
     */
    @Excel(name = "更新者")
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;
}
